<div class="tab-con tab-con-0">
	<div class="top">
		<div class="sort-tab left">
			<div class="is-active" onclick="changeOrder(0)">Latest</div>
			<div onclick="changeOrder(1)">Hottest</div>
		</div>
		<div class="sort-tab right">
			<div class="is-active" onclick="changeShowType(0)">
				<i class="iconfont icongrid"></i>
			</div>
			<div onclick="changeShowType(1)">
				<i class="iconfont iconlist"></i>
			</div>
		</div>
	</div>
	<div class="wrap-tiktoker wrap-card" id="cardList">
        <#if videos?size gt 0>
            <#list videos as data>
				<a href="${data.shareUrl}" target="_blank">
					<div class="card-item">
						<img src="${data.cover}">
						<div class="bottom">
							<i class="iconfont iconic_play"></i>
                            ${data.views}
						</div>
					</div>
				</a>
            </#list>
        <#else>
			<div class="no-data">
				<i class="iconfont iconkongshuju2">
				</i>
				<div>No related data available</div>
			</div>
        </#if>
	</div>
	<div class="wrap-tiktoker wrap-table" id="tableList">
		<table class="tb-main">
			<thead>
			<tr>
				<th class="th-gd" width="12%">
					Hotness
				</th>
				<th class="tx-left">Video Info</th>
				<th width="8%">Views</th>
				<th width="8%">Likes</th>
				<th width="8%">Reviews</th>
				<th width="8%">Share</th>
				<th class="th-gd" width="13%">
					ER
					<i onmouseover="showTips(this)" onmouseout="hideTips(this)" class="iconfont iconbangzhu">
						<div>
							Engagement Rate is calculated by <br> ( Likes + Reviews + Shares ) / Views * 100%
						</div>
					</i>
				</th>
				<th width="8%">Action</th>
			</tr>
			</thead>
			<tbody id="tbody">
            <#list videos as data>
				<tr>
					<td>
						<div class="td-inx">
                            <#if (data.score gte 90)>
								<i class="iconfont iconhuo red">
									<span>${data.score}</span>
								</i>
                            <#elseif (data.score lt 90 && data.score gte 80)>
								<i class="iconfont iconhuo orange">
									<span>${data.score}</span>
								</i>
                            <#elseif (data.score lt 80 && data.score gte 60)>
								<i class="iconfont iconhuo green">
									<span>${data.score}</span>
								</i>
                            <#else>
								<i class="iconfont iconhuo gray">
									<span>${data.score}</span>
								</i>
                            </#if>
						</div>
					</td>
					<td class="tb-tiktoker">
						<div>
							<img src='${data.cover}'/>
							<div class="video-time">${data.duration}</div>
						</div>
						<div>
							<div class="tb-name" title="${data.title}">
                                ${data.title}
							</div>
							<div class="bottom">
								<div class="time">${data.createTime}</div>
							</div>
						</div>
					</td>
					<td align="center">${data.views}</td>
					<td align="center">${data.likes}</td>
					<td align="center">${data.reviews}</td>
					<td align="center">${data.share}</td>
					<td align="center">${data.engagementRate}%</td>
					<td>
						<div class="td-action">
							<div class="green">
								<a href="${data.shareUrl}" target="_blank">
									<i class="iconfont iconbofang-copy" title="play"></i>
								</a>
							</div>
						</div>
					</td>
				</tr>
            </#list>
			</tbody>
		</table>
	</div>
    <#if login == false>
		<a href="javascript:;" onclick="toLogin()">
			<div class="card-more">View more</div>
		</a>
    <#else>
        <#if isUnlocked = true>
            <#if videos?size gt 0>
				<div class="permission-tips"></div>
				<div class="pagination" id="pagination"></div>
            </#if>
        <#else>
			<div class="permission-tips">
                <#if videoTotalSize lte 10>
					You've reached the end.
                <#else>
					Locked report only shows 10 results. Please
					<div style="display: inline-block;cursor: pointer;color: #1890ff;"
					     onclick="checkUnlockPermission()">unlock report
					</div>
					first
                </#if>
			</div>
        </#if>
    </#if>
</div>